﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace EntityModel
{

    /// <summary>
    /// 登录表
    /// </summary>
    [Table("A1")]
    public class EM_Enroll : EntityBase
    {

        /// <summary>
        /// 用户名
        /// </summary>
        [StringLength(30)]
        [Column("A001")]
        [Required]
        public string? Name { get; set; }


        /// <summary>
        /// 密码
        /// </summary>
        [Column("A002")]
        [StringLength(50)]
        [Required]
        public string? Password { get; set; }
        /// <summary>
        /// 电话
        /// </summary>
        [StringLength(30)]
        [Column("A003")]
        [Required]
        public string? Phon { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        [StringLength(30)]
        [Column("A004")]
        [Required]
        public string?  Dizhi { get; set; }
        
        /// <summary>
        /// 是否删除
        /// </summary>
        [Column("A005")]
        [Required]
        public bool IsDel { get; set; }
        /// <summary>
        /// 是否加入黑名单
        /// </summary>
        [Column("A006")]
        [Required]
        public bool IsLock { get; set; }
        /// <summary>
        /// 人员身份
        /// 学生 ： 0
        /// 教师 ： 1
        /// </summary>
        [StringLength(30)]
        [Column("A007")]
        [Required]
        public string? Category { get; set; }

        /// <summary>
        /// 学生登陆人员
        /// </summary>
        public ICollection<EM_Students>? Student { get; set; }

        /// <summary>
        /// 教师登录人员
        /// </summary>
        public ICollection<EM_Teachers>? Teacher { get; set; }
    }
}
